#ifndef VENUS_EFFECTS_REFRACTION_EFFECT_H
#define VENUS_EFFECTS_REFRACTION_EFFECT_H

#include "effect.h"
#include "graphics/error_gl.h"

namespace venus {
class Point;
class RefractionEffect : public Effect {
 public:
  RefractionEffect(float eta_ratio);
  virtual void Begin() const;
  virtual void End() const;
  void set_env_map(int env_map) { env_map_ = env_map; }
  void set_eye_pos(const Point *eye_pos) { eye_pos_ = eye_pos; }
  /*void set_material_color(const Color *material_color) {
    material_color_ = material_color;
  }*/
  void set_eta_ratio(float eta_ratio) { 
    eta_ratio_ = eta_ratio;
    Info("eta ratio: %f", eta_ratio_);
  }
  float eta_ratio() const { return eta_ratio_; }
 private:
  const Point *eye_pos_;
  //const Color *material_color_;
  int env_map_;
  float eta_ratio_;
  GLint eye_pos_var_;
  //GLint material_color_var_;
  GLint env_map_var_;
  GLint eta_ratio_var_;
};
} // namespace venus

#endif // VENUS_EFFECTS_REFRACTION_EFFECT_H
